package com.mf.dao.impl;

import java.util.List;

import org.hibernate.Criteria;
import org.hibernate.SessionFactory;
import org.hibernate.criterion.Restrictions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.mf.common.dao.impl.BaseDaoImpl;
import com.mf.dao.DinlemeDAO;
import com.mf.model.Dinleme;

@Repository
public class DinlemeDAOImpl extends BaseDaoImpl implements DinlemeDAO {

	@Autowired
	SessionFactory sessionFactory;

	public List<Dinleme> getKimNeDinliyor() {
		Criteria criteria = sessionFactory.openSession().createCriteria(Dinleme.class);
		criteria.add(Restrictions.isNull("bitisTarih"));
		return criteria.list();
	}
}
